function [f,sf] = T2F(t,st)
    %This is a function using the FFT funcion to calculate a signal's Fourier
    %Translation
    %input is the time and the signal vertors,the length of time must greater
    %Output is the frequency and the signal spectrum

    T = t(end);
    df = 1/T;
    N = length(st);

    f = -N/2*df : df : N/2*df-df;
    sf = fft(st);
    sf = T/N*fftshift(sf);
end